﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BugTracker.Core.Infrastructure.Exceptions;

namespace BugTracker.WebUX.WebCode
{
    public partial class BTBasePage : System.Web.UI.Page
    {
        protected override void OnError(EventArgs e)
        {
            //Manager Exception
            Exception ex = Server.GetLastError();
            Server.ClearError();
            if (ex as BTBusinessLogicException != null)
            {
                BTLogger.HandleError(ex);
                Response.Redirect(String.Format("Error.aspx?aspxerrorpath={0}", Request.Url.PathAndQuery));
            }
        }
    }
}